<?php

namespace App\Models\admin;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * 套餐
 *
 * @Author: zhx zhx.0830@qq.com
 *
 * @Date: 2023-09-07 14:31:19
 *
 * @LastEditors: zhx zhx.0830@qq.com
 *
 * @LastEditTime: 2023-09-12 09:06:15
 *
 * @FilePath: \new-version-saas\app\Models\admin\Setmeal.php
 *
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
class Setmeal extends Model
{
    use HasFactory, SoftDeletes;

    protected $table = 'admin_setmeal';

    protected $fillable = [
        'app_id',
        'correlation',
        'category',
        'name',
        'description',
        'theme_colors',
        'fonts_color',
        'introduction',
        'numeral',
        'year_unit',
        'price',
        'renewal_fee',
        'how',
        'state',
    ];

    /**
     * 为 array / JSON 序列化准备日期格式
     */
    protected function serializeDate(DateTimeInterface $date): string
    {
        return $date->format('Y-m-d H:i:s');
    }
}
